--- a/ganttproject	2022-03-19 18:04:24.000000000 +0300
+++ b/ganttproject-rosa	2023-08-25 15:03:22.986666635 +0300
@@ -202,18 +202,9 @@
 log "GP_HOME=$GP_HOME"
 log "user.dir=$(pwd)"
 
-JAVA_EXPORTS="--add-exports javafx.controls/com.sun.javafx.scene.control.behavior=ALL-UNNAMED\
-  --add-exports javafx.base/com.sun.javafx=ALL-UNNAMED\
-  --add-exports javafx.controls/com.sun.javafx.scene.control=ALL-UNNAMED\
-  --add-exports javafx.controls/com.sun.javafx.scene.control.skin=ALL-UNNAMED\
-  --add-exports javafx.controls/com.sun.javafx.scene.control.skin.resources=ALL-UNNAMED\
-  --add-exports javafx.controls/com.sun.javafx.scene.control.inputmap=ALL-UNNAMED\
-  --add-exports javafx.graphics/com.sun.javafx.scene.traversal=ALL-UNNAMED\
-  --add-exports javafx.graphics/com.sun.javafx.scene=ALL-UNNAMED\
-  --add-exports javafx.graphics/com.sun.javafx.tk=ALL-UNNAMED\
-  --add-exports javafx.graphics/com.sun.javafx.util=ALL-UNNAMED\
-  --add-opens java.desktop/sun.swing=ALL-UNNAMED\
-  --add-opens java.desktop/sun.awt.X11=ALL-UNNAMED"
+JAVA_EXPORTS="--module-path "/usr/lib/jvm/openjfx17" \
+	--add-modules=javafx.base,javafx.graphics,javafx.controls,javafx.swing,java.desktop"
+
 "$JAVA_COMMAND" -Xmx1024m $JAVA_EXPORTS -Duser.dir="$(pwd)" $DEBUG_ARGS $BOOT_CLASS \
   --app net.sourceforge.ganttproject.GanttProject \
   --version-dirs "$GP_HOME"/plugins:~/.ganttproject.d/updates \
